import request from '@/utils/request'
import Qs from 'qs'

// 登录
export function login(data) {
  return request({
    headers: {
      'User-Type': '-1',
      'content-type': 'application/x-www-form-urlencoded'
    },
    auth: {
      username: 'd0a492b7bcae45efb769a6f7ee1f3054',
      password: '188a9e58c0cc45b9a6c731e33180df10'
    },
    url: '/oauth/token',
    method: 'post',
    params: data
  })
}

// 登出
export function logout() {
  return request({
    url: '/sys/userAuth/logout',
    method: 'post'
  })
}

// 获取图形验证码
export function getCaptcha() {
  return request({
    url: '/sys/userAuth/captcha',
    method: 'get'
  })
}